In the beginning, there was just HTML (Hypertext Markup Language). All Web pages were inherently static, but they were appealing enough to fuel Web mania. Then came Common Gateway Interface (CGI) applications, external applications that ran on the server and, for the first time, allowed for pages whose content wasn't fixed. The next step toward dynamic content was client-side scripting, routines, or simple programs written in macro languages, such as Microsoft Visual Basic, Scripting Edition (VBScript), or scripting languages complying with the ECMAScript specification, that execute inside the browser. Microsoft has recently delivered new proprietary technologies for creating dynamic content in the browser, such as ActiveX Controls and ActiveX documents, whereas other vendors have focused mostly on applets written in Java. The most interesting, powerful, and widely accepted server-side technology is based on server-side scripting and Active Server Pages (ASP). The most powerful way to create dynamic pages on the client side is based on Dynamic HTML (DHTML).
All these technologies have some flaws, however. CGI applications aren't very efficient, they can't be easily scaled to hundreds of clients, and they aren't powerful enough for large Internet or intranet applications. Client-side scripting is definitely more suitable for a Visual Basic programmer, especially if the programmer uses VBScript. Alas, VBScript isn't currently supported by Netscape Navigator; therefore, you should use it only for intranet installations. Neither does Netscape Navigator support ActiveX controls and ActiveX documents. Many Internet developers consider Active Server pages (ASP) the best way to deliver pure HTML dynamic pages to any browser, but it's a fact that building and maintaining a large ASP-based application isn't a trivial task. In addition, scripts on the server aren't the most efficient solution as the number of clients increases.
Visual Basic 6 introduces two fresh approaches to Internet programming that might be the answer to all your needs because they combine the flexibility of proven Internet technologies with the power and the ease of the Visual Basic language. DHTML applications are in-process components (DLLs) that run on the client machine inside Microsoft Internet Explorer and trap events fired by the elements on the DHTML page, such as when the user clicks a button or follows a hyperlink. IIS applications (also known as WebClasses) are DLLs that run on the server machine inside Microsoft Internet Information Server and intercept the requests coming from the client browsers. Neither approach can be considered a brand-new technology because they simply expand what's already available. But the ability to write an entire Internet application using the full-featured Visual Basic language (instead of just a limited script language), test it inside the IDE, and then produce optimized and highly scalable native code (as opposed to less efficient script code) is very appealing to most developers.
In this chapter, I explain how to create DHTML applications. (I cover WebClasses in Chapter 20.) But before diving into the most interesting stuff, we need to go over a few basic concepts.